package com.woniu.supermarket.mapper;

import com.woniu.supermarket.entity.PurchaseReturn;
import com.woniu.supermarket.vo.PurchaseReturnVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PurchaseReturnMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PurchaseReturnVo record);

    PurchaseReturn selectByPrimaryKey(Integer id);

    List<PurchaseReturn> selectAll();

    int updateByPrimaryKey(PurchaseReturn record);
    int updateByCode(@Param("code")String code,@Param("status") Integer status);

    List<PurchaseReturnVo> selectByCons(@Param("name") String returnNumber,@Param("status") Integer status);

    int updateByPurchaseReturnVo(PurchaseReturnVo purchaseReturnVo);

    List<PurchaseReturnVo> selectByCons1(@Param("name") String returnNumber,@Param("status") Integer status,@Param("purchaseId") Integer purchaseId);
}